package nine;

import java.util.Random;

public class Sui {
    public static void main(String[] args) {
        //自己的门
        Sui sui_1=new Sui();
        System.out.printf("%.2f",sui_1.win());
        System.out.println();
        //剩下的门
        Sui sui_2=new Sui();
        System.out.printf("%.2f",sui_2.win());
    }
     float win(){
        int count=0;
        for (int i=0;i<100;i++) {
            Random ra = new Random();
            int a = ra.nextInt(2);
            count+=a;
        }

        return (float) (count/100.0);
    }

}
